// 引入所需的各个模块
var http = require('http');
var express = require('express');
var serve_index = require('serve-index');

// 定义一个express对象，用于web服务
var app = express();
// 发布静态目录，静态目录是当前路径下的public文件夹
app.use(serve_index('./public', {'icons': false}));
app.use(express.static('./public'));

// http服务
var http_server = http.createServer(app);
http_server.listen(8080,'192.168.0.105');

